package plus.easydo.api.factory;

import feign.hystrix.FallbackFactory;
import plus.easydo.api.UserServiceFeignClient;
import plus.easydo.core.result.DataResult;

/**
 * @author yuzhanfeng
 */
public class UserServiceFallbackFactory implements FallbackFactory<UserServiceFeignClient> {
    @Override
    public UserServiceFeignClient create(Throwable throwable) {
        return userName -> DataResult.fail("请求异常，请稍候再试");
    }
}
